package com.master.demo.example.socket;

import lombok.Data;

import java.io.Serializable;

/**
 * socket传输数据dto
 *
 * @author: Yang
 * @date: 2019/10/7
 * @version: 3.0.0
 * Copyright Ⓒ 2021 Master Computer Corporation Limited All rights reserved.
 */
@Data public class WebSocketSendDto implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 功能码 0 心跳 1 消息通知 2 线上订单通知 3：线上订单退款
     */
    private Integer functionCode;

    /**
     * 用户id
     */
    private String userId;

    /**
     * 这边假设是string的消息体
     */
    private Object message;

    public WebSocketSendDto() {
    }

    public WebSocketSendDto(Integer functionCode, String userId, Object message) {
        this.functionCode = functionCode;
        this.userId = userId;
        this.message = message;
    }
}
